<template>
  <slot></slot>
</template>

<script setup lang="ts">
import { inject } from 'vue';
import { type TableItemProps } from './table-item';
import { TableExpandInjectKey } from '../../utils';

defineOptions({ name: 'ZTableItem' });

const $props = defineProps<TableItemProps>();

const expandTableContext = inject(TableExpandInjectKey, undefined);

// 向z-expand-table注册columns
expandTableContext?.registerColumn({
  label: $props.label,
  prop: $props.prop,
});
</script>

<style scoped></style>
